<template>
	<!-- 发布  发布配件询价  车型适配-->
	<view class="content">
		<view class="Christine">
			<view class="chrinputbox" id="chrinputbox">
				<view class="chrinput">
					<input type="text" v-model="keyWords" class="usearch" placeholder="请输入VIN码" maxlength="17" confirm-type="search" @confirm="getCarAdaptation(0)"/>
				</view>
				<view class="chrshaom" @click="scanning">
							<i-icon icon="iconshouye-saoma"  type='single'  size='36rpx' color="#FBD220" class="chricon"></i-icon>
					<view class="chrtext">
						扫描
					</view>
				</view>
			</view>
			<view class="chrtext2" @click="manuallyaddmodels">
				手动添加车型  <u-icon class="ml-5" name="arrow-right" color="#333" size="18"></u-icon>
				<!-- <i-icon icon="iconshouye-xiala"  type='single'  size='20rpx' color="#333"></i-icon> -->
				
				<!-- <image :src="Core.globalImgUrlBussiness+'/Y_Accessoriesinquiry/you@2x.png'"></image> -->
			</view>
		</view>
    <!-- 我的适配车型  -->
		<view class="recommend">
			<view class="redbox">
				<view class="redhead">
					<view class="redmy">
						我的适配车型
					</view>
				</view>
				<view class="redboxs" v-show="!carlistxh.length">
					<view class="zanwu">
						—— 请扫描VIN码或手动添加车型 ——
					</view>
				</view>
				<view class="redboxs" v-for="(item,index) in carlistxh" :key="index">
					<view class="redner" @click="adaptation(item)">
						<view class="redborder">
							<view class="retext">
								<text>{{item.brand}} {{item.cartypename}} {{item.name}}</text>
							</view>
						</view>
					</view>
        </view>
      </view>
    </view>
    <!--      历史记录-->
    <view class="recommend" v-show="!carlistxh.length">
      <view class="redbox">
        <view class="redhead">
          <view class="redmy">
            历史记录
          </view>
          <view class="redelete" @click="deleteclick(Deletetext)" v-show="historyList.length">
            {{Deletetext}}
          </view>
        </view>
        <view class="redboxs" v-show="!historyList.length">
          <view class="zanwu">
            —— 暂无历史记录 ——
          </view>
        </view>
        <view class="redboxs" v-for="(item,index) in historyList" :key="index">
          <view class="redner" @click="adaptation(item)">
            <view class="redborder">
              <view class="retext">
                <text>{{item.brand}} {{item.cartypename}} {{item.name}}</text>
              </view>
            </view>
          </view>
          <!-- 删除 -->
          <view class="redbrimg" v-show="deletelookann" @click="deletexinxi(index)">
            <i-icon icon="iconquxiaoxunjia"  type='single'  size='36rpx' color="#e1e1e1"></i-icon>
          </view>
        </view>
      </view>
		</view>

		<!-- 扫描失败 -->
		<view>
			<u-modal title='识别失败' v-model="showsb" width="77%" :mask-close-able="true" :title-style="{fontSize:'34rpx',color: '#333333'}"
			 :show-confirm-button="false">
				<view class="slot-shibai">
					<rich-text nodes="提示：暂未识别到您的VIN码信息， 请确认VIN码正确后重新扫描"></rich-text>
				</view>
				<view class="slot-contentbutto">
					<view class="slot-Rescan" @click="quxiaosmioa">
						取消
					</view>
					<view class="slot-Confirmadd" @click="chongxsm">
						重新扫描
					</view>
				</view>
			</u-modal>
		</view>
		<!-- <view style="height: 140rpx;"></view>
		<view class="quedingbtn" @click="chakanwxc">
			<button>确认添加</button>
		</view> -->
	</view>
</template>


<script src="./selectCarModel.js"></script>
<style lang="scss" scoped>
	@import './selectCarModel.scss';
</style>